package com.example.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
public class UserEntity {
    private Integer id;
    private Integer deptId;
    private String username;
    private String password;
    private String nickname;
    private String avatar;
    private String gender;
    private String mobile;
    private String email;
    private LocalDate birthday;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    private Boolean birthdayIsNull;
}

/*
create table user(
    id int primary key auto_increment comment "ID",
    dept_id int not null default 0 comment "部门ID",
    username varchar(20) unique not null comment "用户名",
    password varchar(20) not null comment "密码",
    nickname varchar(10) not null comment "昵称",
    avatar varchar(255) not null default '' comment "头像",
    gender ENUM('M','F','') not null default '' comment "性别：M男性、F女性",
    mobile char(11) not null default '' comment "手机号",
    email char(255) not null default '' comment "邮箱",
    birthday date comment "生日",
    create_time datetime not null comment "创建时间",
    update_time datetime not null comment "更新时间"
 ) comment "员工表";

 insert into user(username, password, nickname, create_time, update_time)
 values('admin', '123456', '年少小欢喜', '2025-01-01 00:00:00', '2025-01-01 00:00:00');
 */